package v1

import (
	"dwcms/module"
	"dwcms/utils/errmsg"
	"github.com/gin-gonic/gin"
)

func AddUser(c *gin.Context) {
	var Tuser module.User
	c.BindJSON(&Tuser)
	code := module.CreateUser(&Tuser)
	c.JSON(200, gin.H{
		"state": code,
		"msg":   errmsg.GetErrorMsg(code),
		"data":  Tuser,
	})
}
